package cn.wolfcode.wms.mapper;

import cn.wolfcode.wms.domain.Role;
import cn.wolfcode.wms.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role entity);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role entity);

    List<Role> queryForList(QueryObject qo);
//    维护关系
    void insertRealtion(@Param("roleId") Long roleId, @Param("permissionId") Long permissionId);
//    破坏关系
    void deleteRealtion(Long roleId);
}